﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
    public class BOMItem
    {
        private int _bomItemId;
        private int _bomId;
        private int _productId;
        private int _sequence;
        private string _materialType;
        private string _detailedMaterialType;
        private string _materialNumber;
        private string _materialDescription;

        // BOM项目ID（主键）
        public int BOMItemId
        {
            set { _bomItemId = value; }
            get { return _bomItemId; }
        }

        // 关联的BOM ID（外键）
        public int BomId
        {
            set { _bomId = value; }
            get { return _bomId; }
        }

        // 关联的产品ID（外键）
        public int ProductId
        {
            set { _productId = value; }
            get { return _productId; }
        }

        // 物料序列号（在BOM中的顺序）
        public int Sequence
        {
            set { _sequence = value; }
            get { return _sequence; }
        }

        // 物料类型
        public string MaterialType
        {
            set { _materialType = value; }
            get { return _materialType; }
        }

        // 详细物料类型
        public string DetailedMaterialType
        {
            set { _detailedMaterialType = value; }
            get { return _detailedMaterialType; }
        }

        // 物料编号
        public string MaterialNumber
        {
            set { _materialNumber = value; }
            get { return _materialNumber; }
        }

        // 物料描述
        public string MaterialDescription
        {
            set { _materialDescription = value; }
            get { return _materialDescription; }
        }

        // 构造函数
        public BOMItem()
        {
            // 初始化默认值
            _materialType = string.Empty;
            _detailedMaterialType = string.Empty;
            _materialNumber = string.Empty;
            _materialDescription = string.Empty;
        }
    }
}
